/**
 * Copyright(c) by JNet Smartware Group.
 * All rights reserved. Not distribution or redistribution without
 * any permission of JNet Smartware Group.
 * 
 * @author thuc
 * 2010/03/15
 */
package vn.smartware.co.server.dao.factory;

import java.sql.Connection;
import java.util.ArrayList;

import vn.smartware.co.dto.BillDTO;
import vn.smartware.co.dto.ReserveDetailDTO;
import vn.smartware.co.forms.ReserveForm;
import vn.smartware.co.framework.bean.LoginDTO;
import vn.smartware.co.framework.exception.ServerException;


/**
 * AbstractReserveDAO
 * @author thuctt
 */
@SuppressWarnings({"rawtypes"})
public abstract class AbstractReserveDAO {

	/**
	 * getReserveInfo
	 * @param form
	 * @param user
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void getReserveInfo(ReserveForm form, LoginDTO user,
			Connection conn) throws ServerException;

	/**
	 * getDetailDrink
	 * @param reserveId
	 * @param conn
	 * @return ArrayList
	 * @throws ServerException
	 */
	abstract public ArrayList getDetailDrink(String reserveId, Connection conn)
			throws ServerException;

	/**
	 * getDetailFood
	 * @param reserveId
	 * @param conn
	 * @return ArrayList
	 * @throws ServerException
	 */
	abstract public ArrayList getDetailFood(String reserveId, Connection conn)
			throws ServerException;

	/**
	 * create new reservation
	 * @param form
	 * @param user
	 * @param conn
	 * @return String
	 * @throws ServerException
	 */
	abstract public String createReservation(ReserveForm form, LoginDTO user,
			Connection conn) throws ServerException;

	/**
	 * registerDetailFood
	 * @param reserveId
	 * @param food
	 * @param user
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void registerDetailFood(String reserveId,
			ReserveDetailDTO food, LoginDTO user, Connection conn)
			throws ServerException;

	/**
	 * registerDetailDrink
	 * @param reserveId
	 * @param drink
	 * @param user
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void registerDetailDrink(String reserveId,
			ReserveDetailDTO drink, LoginDTO user, Connection conn)
			throws ServerException;

	/**
	 * updateReservation
	 * @param form
	 * @param user
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void updateReservation(ReserveForm form, LoginDTO user,
			Connection conn) throws ServerException;

	/**
	 * deleteReservation
	 * @param form
	 * @param user 
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void deleteReservation(ReserveForm form, LoginDTO user, Connection conn)
			throws ServerException;

	/**
	 * delete detail food/drink
	 * @param reserveId
	 * @param detail
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void deleteDetail(String reserveId, int detail,
			Connection conn) throws ServerException;

	/**
	 * chkExistBill
	 * @param reserveId
	 * @param conn
	 * @return int
	 * @throws ServerException
	 */
	abstract public int chkExistBill(String reserveId, Connection conn)
			throws ServerException;

	/**
	 * createBill
	 * @param reserveId
	 * @param bill
	 * @param user
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void createBill(String reserveId, BillDTO bill,
			LoginDTO user, Connection conn) throws ServerException;

	/**
	 * updateBill
	 * @param reserveId
	 * @param bill
	 * @param user
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void updateBill(String reserveId, BillDTO bill,
			LoginDTO user, Connection conn) throws ServerException;

	/**
	 * deleteBill
	 * @param reserveId
	 * @param user
	 * @param conn
	 * @throws ServerException
	 */
	abstract public void deleteBill(String reserveId, LoginDTO user,
			Connection conn) throws ServerException;

}
